package com.yuxi.shuzu;

import java.util.Arrays;
import java.util.Scanner;

public class Demo1 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入一个整数");
        int l = input.nextInt();
        if (l<=0){
            System.err.println("此数不能小于等于0");
            return;
        }
        int[] arr = new int[l];

        for (int i = 0; i < arr.length; i++) {
            arr[i] = (int) ((Math.random() * (10)) + 1);

        }
        System.out.println(Arrays.toString(arr));

        for (int i : arr) {
            if (i>5&&i%2==0){
                System.out.print(i+" ");
            }
        }
    }
}
